/*
 * HelloWorld.cpp
 *
 *  Created on: 17/05/2014
 *      Author: lucio
 */

#include "HelloWorld.h"
#include "SDLGameWindow.h"
#include <iostream>

void HelloWorld::on_button_clicked()
{
	SDL_GameWindow sdlWindow;
	sdlWindow.execute();
}

HelloWorld::HelloWorld()
: m_button()   // creates a new button with label "Hello World".
{

  m_button.add_pixlabel("/home/lucio/pj2.png","Argentina",20,20);

  set_title("Pixmap'd buttons!");
  // Sets the border width of the window.
  set_border_width(100);

  // When the button receives the "clicked" signal, it will call the
  // on_button_clicked() method defined below.
  m_button.signal_clicked().connect(sigc::mem_fun(*this,
          &HelloWorld::on_button_clicked));

  // This packs the button into the Window (a container).
  add(m_button);

  // The final step is to display this newly created widget...
  m_button.show();
}

HelloWorld::~HelloWorld()
{
}

